package cn.edu.scau.cmi.huangzhiyuan.spring.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ApplicationContextUtil {
	
	public static ApplicationContext applicationContext;
	final static String contextPath = "cn/edu/scau/cmi/huangzhiyuan/spring/springApplicationContext.xml";
	
	public static ApplicationContext getApplicationContext() {
		if(applicationContext==null) {
			applicationContext=new ClassPathXmlApplicationContext(contextPath);
		}
		return applicationContext;
	}
	
}
